/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 29489
 * Date: 2023-04-13
 * Time: 9:47
 */
public class Role {
    protected String name;       //姓名
    protected int age;
    //构造方法
    public Role() {
    }

    public Role(String name, int age) {
        this.name = name;
        this.age=age;
    }

    //Setter/Getter
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    //业务方法
    public void show(){
        System.out.print("我是"+name+"，年龄"+age+"岁。");
    }
}
